@import '../assets/import.less';

.co-button {
  display: inline-block;
  overflow: hidden;
  position: relative;
  transition-duration: 300ms;
  transition-timing-function: @easeOutFunction;
  text-decoration: none;
  text-align: center;
  border: none;
  appearance: none;
  outline: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  font-size: 36px;
  height: 110px;
  min-width: 220px;
  background-color: #2B2D31;
  color: @alternateTextColor;
  border-radius: 4px;

  /*no*/
  .mo-icon-left {
    margin-right: 10px;
  }

  .mo-icon-right {
    margin-left: 10px;
  }

  .active-highlight(.2, #2B2D31);
}

.co-button__wrapper {
  display: flex;
  padding: 0 58px;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.co-button--block {
  display: block;
  width: 100%;
  font-size: 36px;
  border-radius: 0;
}

.co-button--round {
  border-radius: 100px;
}

.co-button--primary {
  background-color: transparent;
  background-image: linear-gradient(-116deg, #3Cb9Ff 0%, #6044D4 100%);
}

.co-button--outline {
  background: transparent;
  border: 1px solid @primaryColor;
  color: @primaryColor;
}

.co-button--disabled {
  cursor: default;
  background: #2B2D31;
  color: @disabledColor;

  &:active::before {
    content: none;
  }
}

.co-circle-wrapper {
  display: inline-block;
  position: relative;
  width: 48px;
  height: 48px;

  &.active {
    -webkit-animation: container-rotate 1568ms linear infinite;
    animation: container-rotate 1568ms linear infinite;
  }

  .co-circle {
    border-radius: 50%;
  }

  .left {
    float: left !important;
  }

  .right {
    float: right !important;
  }

}

.co-circle-spinner {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  border-color: @alternateTextColor;
  opacity: 1;
  -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
  animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
}

.co-circle-clipper {
  display: inline-block;
  position: relative;
  width: 50%;
  height: 100%;
  overflow: hidden;
  border-color: inherit;
}

.co-circle-gap-patch {
  position: absolute;
  top: 0;
  left: 45%;
  width: 10%;
  height: 100%;
  overflow: hidden;
  border-color: inherit;
}

.co-circle-gap-patch .co-circle {
  width: 1000%;
  left: -450%;
}

.co-circle-clipper .co-circle {
  width: 200%;
  height: 100%;
  border-width: 3px;
  border-style: solid;
  border-color: inherit;
  border-bottom-color: transparent !important;
  border-radius: 50%;
  -webkit-animation: none;
  animation: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
}

.co-circle-spinner.active .co-circle-clipper.left .co-circle {
  -webkit-animation: left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
  animation: left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
}

.co-circle-spinner.active .co-circle-clipper.right .co-circle {
  -webkit-animation: right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
  animation: right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
}

.co-circle-clipper.left .co-circle {
  left: 0;
  border-right-color: transparent !important;
  -webkit-transform: rotate(129deg);
  transform: rotate(129deg);
}

.co-circle-clipper.right .co-circle {
  left: -100%;
  border-left-color: transparent !important;
  -webkit-transform: rotate(-129deg);
  transform: rotate(-129deg);
}


@-webkit-keyframes fill-unfill-rotate {
  12.5% {
    -webkit-transform: rotate(135deg);
  }

  25% {
    -webkit-transform: rotate(270deg);
  }

  37.5% {
    -webkit-transform: rotate(405deg);
  }

  50% {
    -webkit-transform: rotate(540deg);
  }

  62.5% {
    -webkit-transform: rotate(675deg);
  }

  75% {
    -webkit-transform: rotate(810deg);
  }

  87.5% {
    -webkit-transform: rotate(945deg);
  }

  to {
    -webkit-transform: rotate(1080deg);
  }
}

@keyframes fill-unfill-rotate {
  12.5% {
    transform: rotate(135deg);
  }

  25% {
    transform: rotate(270deg);
  }

  37.5% {
    transform: rotate(405deg);
  }

  50% {
    transform: rotate(540deg);
  }

  62.5% {
    transform: rotate(675deg);
  }

  75% {
    transform: rotate(810deg);
  }

  87.5% {
    transform: rotate(945deg);
  }

  to {
    transform: rotate(1080deg);
  }
}

@-webkit-keyframes left-spin {
  from {
    -webkit-transform: rotate(130deg);
  }

  50% {
    -webkit-transform: rotate(-5deg);
  }

  to {
    -webkit-transform: rotate(130deg);
  }
}

@keyframes left-spin {
  from {
    transform: rotate(130deg);
  }

  50% {
    transform: rotate(-5deg);
  }

  to {
    transform: rotate(130deg);
  }
}

@-webkit-keyframes right-spin {
  from {
    -webkit-transform: rotate(-130deg)
  }

  50% {
    -webkit-transform: rotate(5deg)
  }

  to {
    -webkit-transform: rotate(-130deg)
  }
}

@keyframes right-spin {
  from {
    transform: rotate(-130deg)
  }

  50% {
    transform: rotate(5deg)
  }

  to {
    transform: rotate(-130deg)
  }
}


@-webkit-keyframes container-rotate {
  to {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes container-rotate {
  to {
    transform: rotate(360deg);
  }
}
